Two-dimensional image data compression and decompression system

ABSTRACT

a dual-mode encoding and decoding procedure enables image data to be compressed optionally in one-dimensional (1D) mode or two-dimensional (2D) mode. In 1D mode, color transitions in the image are encoded as run length features only. In 2D mode, the transitions are encoded as vertical correlation features wherever possible, and where this is not possible, the transitions are encoded as run length features. The compression achieved by run length encoding in 2D mode may be enhanced in those instances where the &#34;history line&#34; which precedes the current scan line contains a transition located between points that are vertically aligned with the beginning and end points of the run currently being encoded. Run length counting is suspended for those pels in the current run that could have been referenced to the history transition if the run had ended with any of these pels, thereby enabling the run to be encoded as though it contained fewer pels than its actual length. Compression may be enhanced still further by dynamically interchanging the variable-length bit patterns respectively representing certain vertical correlation and run length prefix codes depending upon whether the preceding transition was encoded as a vertical correlation feature or a run length feature.



